package com.example.mall.dto;

import com.example.mall.mbg.model.Role;
import com.example.mall.mbg.model.User;

public class UserDto extends User {
    private Role role;
    public UserDto(User user) {
        setUserid(user.getUserid());
        setUsername(user.getUsername());
        setPassword(user.getPassword());
        setRealname(user.getRealname());
        setEmail(user.getEmail());
        setPhonenumber(user.getPhonenumber());
        setDepartment(user.getDepartment());
        setRoleid(user.getRoleid());
        setCreatetime(user.getCreatetime());
        setUpdatetime(user.getUpdatetime());
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Role getRole() {
        return role;
    }
}
